import {Children, lazy} from 'react'

let Main=lazy(()=>import('../pages/main/Index'))
let Home=lazy(()=>import('../pages/home/Index'))
let Classfiy=lazy(()=>import('../pages/classfiy/Index'))
let Message=lazy(()=>import('../pages/message/Index'))
let User=lazy(()=>import('../pages/user/Index'))

  export let homeRouter=[
    {
        path:'/',
        element:<Home></Home>,
        title:'首页'
    },
     {
        path:'/classfiy',
        element:<Classfiy></Classfiy>,
        title:'分类'
    },
     {
        path:'/message',
        element:<Message></Message>,
        title:'消息'
    },
     {
        path:'/user',
        element:<User></User>,
        title:'个人'
    },
  ]


let routes=[
    {
        path:'/',
        element:<Main></Main>,
        children:homeRouter
    }
]
export default routes